package cc.autoapi.pucong.auto.flow.provider.properties.entity;

import cc.autoapi.pucong.auto.flow.persistence.po.properties.PropertiesInfoPo;
import cc.autoapi.pucong.auto.flow.provider.properties.entity.vo.PropertiesInfoVo;
import cc.autoapi.pucong.auto.flow.provider.properties.entity.dto.PropertiesInfoUpdateDto;
import cc.autoapi.pucong.auto.flow.provider.properties.entity.qo.PropertiesInfoQo;
import cc.autoapi.pucong.auto.flow.provider.properties.entity.dto.PropertiesInfoAddDto;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author pucong
 * @description 全局参数信息 cover
 * @create 2024-10-06
 */
@Mapper(componentModel = "spring")
public interface PropertiesInfoConvert {

    PropertiesInfoConvert INSTANCE = Mappers.getMapper(PropertiesInfoConvert.class);

    /**
     * dto转po
     * @param dto
     * @return
     */
    PropertiesInfoPo dto2po(PropertiesInfoUpdateDto dto);

    /**
     * dto转po
     * @param dto
     * @return
     */
    PropertiesInfoPo dto2po(PropertiesInfoQo dto);

    /**
     * dto转po
     * @param dto
     * @return
     */
    PropertiesInfoPo dto2po(PropertiesInfoAddDto dto);


    /**
     * do转dto
     * @param propertiesInfo
     * @return
     */
    PropertiesInfoVo po2vo(PropertiesInfoPo propertiesInfo);


    /**
     * list<po>转list<vo>
     * @param propertiesInfos
     * @return
     */
    List<PropertiesInfoVo> po2vos(List<PropertiesInfoPo> propertiesInfos);
}
